<%@ Page Language="C#" MasterPageFile="~/Site.master" Theme="Default" EnableTheming="true" 
    AutoEventWireup="true" CodeFile="AddBooks.aspx.cs" Inherits="AddBooks" 
    Title="Dr. Yurttas' Office Library &mdash; Add Books" %>
<asp:Content ID="ContentAdmin" ContentPlaceHolderID="MasterContentAdmin" Runat="Server">
    <asp:LoginView ID="LoginViewAdmin" runat="server">
        <RoleGroups>
            <asp:RoleGroup Roles="admin">
                <ContentTemplate>
                
                <asp:Panel runat="server" ID="addBooksPanel" DefaultButton="addButton" Width="450px">
                    <table style="width: 100%; height: 138px">
                        <tr>
                            <td align="center" style="font-weight: bold; font-size: 0.9em; 
                                color: white; background-color: #5d7b9d" colspan="3">Insert New Book:</td>
                        </tr>
                        <tr>
                            <td style="width: 1381px">
                                ISBN:
                            </td>
                            <td style="width: 376px">
                                <asp:TextBox ID="bookIsbn" runat="server"></asp:TextBox>
                            </td>
                            <td style="width: 247px"> 
                                <asp:Button ID="fetchBtn" runat="server" OnClick="fetchBtn_Click" 
                                    Text="Fetch other fields" />
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 1381px">
                                Title:
                            </td>
                            <td colspan="2">
                                <asp:TextBox ID="bookTitle" runat="server" Width="97%"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 1381px">
                                Author:
                            </td>
                            <td colspan="2">
                                <asp:TextBox Width="97%" ID="bookAuthor" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 1381px">
                                Publishing Information:
                            </td>
                            <td colspan="2">
                                <asp:TextBox Width="97%" ID="bookPublisher" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 1381px; height: 23px">
                                Code Language:
                            </td>
                            <td colspan="2">
                                <asp:TextBox Width="97%" ID="bookLanguage" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 1381px; height: 23px">
                                Number:
                            </td>
                            <td colspan="2">
                                <asp:TextBox Width="47%" ID="bookNumber" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <asp:Label runat="server" ID="errorLabel" Text="" ForeColor="Red"></asp:Label>
                            </td>
                            <td>
                                <div style="float:right;">
                                    <asp:Button ID="addButton" runat="server" OnClick="addButton_Click"
                                        Text="Add book" Width="121px" />
                                </div>
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
                </ContentTemplate>
            </asp:RoleGroup>
        </RoleGroups>
    </asp:LoginView>                       
</asp:Content>
<asp:Content ID="ContentUser" ContentPlaceHolderID="MasterContentUser" Runat="Server">
    <asp:LoginView ID="LoginViewUser" runat="server">
        <RoleGroups>
            <asp:RoleGroup Roles="user">
                <ContentTemplate>
                    Sorry, you do not have access to this page.
                </ContentTemplate>
            </asp:RoleGroup>
        </RoleGroups>
    </asp:LoginView>                       
</asp:Content>
<asp:Content ID="ContentAnonymous" ContentPlaceHolderID="MasterContentAnonymous" Runat="Server">
    <asp:LoginView ID="LoginViewAnonymous" runat="server">
        <AnonymousTemplate>
            Sorry, you do not have access to this page.
        </AnonymousTemplate>
    </asp:LoginView>                       
</asp:Content>
